<!DOCTYPE html>
<html>
<head>
  <title>单据详情</title>

  <meta name="keywords" content="keyword1,keyword2,keyword3">
  <meta name="description" content="this is my page">
  <meta name="content-type" content="text/html; charset=UTF-8">
  
<link rel="stylesheet" href="/Hospital/lib/layui-v2.1.6/layui/css/layui.css" media="all">
<link rel="stylesheet" href="/Hospital/resources/css/table.css" media="all">
</head>
<style>
	 body {
        width: 100%;
        height: 100%;
        background: #fff;
    }
</style>
<body>
 	<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
		<legend>单据详情</legend>
	</fieldset>
	<table id="billDetailTable" class="layui-table table"></table>
</body>
<script src="/Hospital/lib/jquery.min.js" charset="utf-8"></script>
<script src="/Hospital/lib/layui-v2.1.6/layui/layui.js" charset="utf-8"></script>
<script>
layui.use(['table','layer'],function(){
	var $ = layui.jquery;
	var table = layui.table;
	var layer = layui.layer;
	
	initTable();	//初始化Table
	//listen();		//监听事件
	
	function initTable(){
		var height = window.innerHeight*0.8;
		var tableWidth = window.innerWidth*0.125;
		var data = JSON.parse(localStorage.getItem("billId"));
		localStorage.removeItem("billId");
		table.render({
			id : 'billDetailTable',
			elem : '#billDetailTable',
			page : true,
			center : true,
			limit : 10,
			height : height,
			cols :[[
	                {field:'projectName',width:tableWidth,title:'项目名称',align:'center'},
	                {field:'number',width:tableWidth,title:'治疗次数',align:'center'},
	                {field:'unitPrice',width:tableWidth,title:'单次费用',align:'center'},
	                {field:'price',width:tableWidth,title:'总费用',align:'center'},
	                {field:'doctorCost',width:tableWidth,title:'医生抽成(%)',align:'center'},
	                {field:'clinicCost',width:tableWidth,title:'门诊抽成(%)',align:'center'},
	                {field:'excutorCost',width:tableWidth,title:'执行抽成(%)',align:'center'},
	                {field:'extraInfo',width:tableWidth,title:'额外信息',align:'center'},
		    	   ]],
		   	url : "/Hospital/billController/checkBillDetail",
		   	method : 'POST',
		   	where : data,
		   	response : {
		   		statusName:"code",
            	statusCode:200,
            	countName:'total',
            	msgName:"msg",
            	dataName:"result"
		   	}
		});
	}
});
</script>
</html>
